<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<base href="/bestinc/" />
<link rel="stylesheet" href="static/layui/css/layui.css">
<link rel="stylesheet" href="static/css/route/foundation/busCircuit.css">
<link href="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="static/layui/layui.js"></script>
<script type="text/javascript"
	src="http://api.map.baidu.com/api?v=2.0&ak=C59f573001c2da1eced570db6c53cdf1"></script>
<script type="text/javascript"
	src="//api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
<script type="text/javascript"
	src="//api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>
<script type="text/javascript" src="static/js/jquery.min.js"></script>
</head>

<body>
	<div id="content">
		<div class="layui-fluid" style="height: 100%;">

			<div class="layui-row layui-col-space1"
				style="height: 100%; width: 100%;">
				<div class="layui-col-md7"
					style="right: 5px; height: 100%; padding-top: 10px; padding-bottom: 10px;">
					<div class="hread1">
						<form class="layui-form">
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-label">路线名字</label>
									<div class="layui-input-inline">
										<input id="busLineName" type="text" placeholder="请输入"
											autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">开始城市</label>
									<div class="layui-input-inline">
										<input id="startCity" type="text" placeholder="请输入"
											autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">结束城市</label>
									<div class="layui-input-inline">
										<input id="endCity" type="text" placeholder="请输入"
											autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">是否可用</label>
									<div class="layui-input-inline">
										<select id="useable">
											<option value="">请选择</option>
											<option value="Y">可用</option>
											<option value="N">禁用</option>
										</select>
									</div>
								</div>

								<div class="layui-inline">
									<label class="layui-form-label"></label>
									<div class="layui-input-inline" style="left: 50%;">
										<button class="layui-btn" lay-submit=""
											lay-filter="busCircuitSearchBtn">
											<i class="layui-icon layui-icon-search"
												style="font-size: 14px;"></i> 查询
										</button>
										<button class="layui-btn" type="reset">
											<i class="layui-icon layui-icon-refresh "
												style="font-size: 14px;"></i> 重置
										</button>
									</div>
								</div>
							</div>
						</form>
					</div>

					<div id="dataDiv">
						<!-- 数据表格 -->
						<table class="layui-hide" id="busCircuitTable" lay-filter="test"></table>
					</div>


				</div>
				<div class="layui-col-md5"
					style="left: 5px; height: 100%; padding-top: 10px; padding-bottom: 10px;">
					<div id="allmap"
						style="width: 100%; height: 100%; border-radius: 10px;"></div>
				</div>
			</div>


		</div>
	</div>
	
	<!-- 添加模态框 -->
	<div id="addBusCircuitModal" class="definedModal">
		<form id="addBusCircuitForm" lay-filter="addBusCircuitForm" class="layui-form" action="">
		<input type="hidden" id="circuitId" name="circuitId"> <!-- 路线ID -->
		
		<input id="startBusStationLng" type="hidden" name="startBusStationLng"> <!-- 开始车站经度 -->
		<input id="startBusStationLat" type="hidden" name="startBusStationLat"> <!-- 开始车站纬度 -->
		<input id="endBusStationLng" type="hidden" name="endBusStationLng"> <!-- 结束车站经度 -->
		<input id="endBusStationLat" type="hidden" name="endBusStationLat"> <!-- 结束车站纬度 -->
		
		<!-- <input type="hidden" id="startCityId" name="startCityId"> --> <!-- 开始城市ID -->
		<div class="layui-form-item">
			    <label class="layui-form-label">开始城市</label>
			    <div class="layui-input-block">
			      <select name="startCity" id ="startCity" lay-filter="startCity" lay-verify="" lay-search>
				  </select>  
			    </div>
			  </div>
		
		 <div class="layui-form-item">
			    <label class="layui-form-label">开始车站</label>
			    <div class="layui-input-block"><!--startBusStationName  busStationId-->
			      <select name="startId" id="startBusStationName" lay-filter="startBusStationName" lay-verify="" lay-search>
			      	  
				  </select>  
			    </div>
			  </div>
		<input type="hidden" id="endCityId" name="endCityId"> <!-- 结束城市ID -->
		<div class="layui-form-item">
			    <label class="layui-form-label">结束城市</label>
			    <div class="layui-input-block">
			      <select name="endCity" id ="endCity" lay-filter="endCity" lay-verify="" lay-search>
				  </select>  
			    </div>
			  </div>
		
		 <div class="layui-form-item">
			    <label class="layui-form-label">结束车站</label>
			    <div class="layui-input-block">
			      <select name="endId" id="endBusStationName" lay-filter="endBusStationName" lay-verify="" lay-search>
			      	  
				  </select>  
			    </div>
			  </div>
			  <div class="layui-form-item">
			<label class="layui-form-label">路线名称</label>
			<div class="layui-input-block">
				<input type="text" name="busLineName" id="busLineName" lay-verify="required"
					placeholder="请输入路线名称" autocomplete="off" class="search layui-input ">
			</div>
		</div>
		<div class="layui-form-item">
    		<label class="layui-form-label">路线类型</label>
    		<div class="layui-input-block">
      			<input type="radio" id="circuitType" name="circuitType" value="0" title="淘宝专属"><!-- 最少时间 -->
      			<input type="radio" id="circuitType" name="circuitType" value="1" title="快件专属"><!-- 最短距离 -->
      			<input type="radio" id="circuitType" name="circuitType" value="2" title="普件专属"><!-- 避开高速 -->
   		</div>
  </div>
		
		<div class="layui-input-block" style="text-align: right;">
			<button type="submit" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="addbusCircuitBtn">添加</button>
			<button type="button" class="layui-btn layui-btn-primary  modalClose">关闭</button>
			
		</div>
		</form>
	</div>
	<!-- 添加模态框 End -->
	
	<!-- 修改模态框 -->
	<div id="updateBusCircuitModal" class="definedModal">
		<form id="updateBusCircuitForm" lay-filter="updateBusCircuitForm" class="layui-form" action="">
		<input type="hidden" id="circuitId" name="circuitId"> <!-- 路线ID -->
		<input type="hidden" name="_method" value="PUT"/>
		<input id="startBusStationLng" type="hidden" name="startBusStationLng"> <!-- 开始车站经度 -->
		<input id="startBusStationLat" type="hidden" name="startBusStationLat"> <!-- 开始车站纬度 -->
		<input id="endBusStationLng" type="hidden" name="endBusStationLng"> <!-- 结束车站经度 -->
		<input id="endBusStationLat" type="hidden" name="endBusStationLat"> <!-- 结束车站纬度 -->
		
		
		<div class="layui-form-item">
			<label class="layui-form-label">开始城市</label>
			<div class="layui-input-block">
				<input type="text" name="startCity" id="startCity" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="search layui-input "disabled>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">开始车站</label>
			<div class="layui-input-block">
				<input type="text" name="startBusStationName" id="startBusStationName" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="search layui-input "disabled>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">结束城市</label>
			<div class="layui-input-block">
				<input type="text" name="endCity" id="endCity" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="search layui-input "disabled>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">结束车站</label>
			<div class="layui-input-block">
				<input type="text" name="endBusStationName" id="endBusStationName" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="search layui-input "disabled>
			</div>
		</div>
		
			  <div class="layui-form-item">
			<label class="layui-form-label">路线名称</label>
			<div class="layui-input-block">
				<input type="text" name="busLineName" id="busLineName" lay-verify="required"
					placeholder="请输入路线名称" autocomplete="off" class="search layui-input ">
			</div>
		</div>
		<div class="layui-form-item">
    		<label class="layui-form-label">路线类型</label>
    		<div class="layui-input-block">
      			<input type="radio" id="circuitType" name="circuitType" value="0" title="淘宝专属"><!-- 最少时间 -->
      			<input type="radio" id="circuitType" name="circuitType" value="1" title="快件专属"><!-- 最短距离 -->
      			<input type="radio" id="circuitType" name="circuitType" value="2" title="普件专属"><!-- 避开高速 -->
   		</div>
  </div>
  <div class="layui-form-item">
    		<label class="layui-form-label">是否可用</label>
    		<div class="layui-input-block">
      			<input type="radio" id="useable" name="useable" value="Y" title="可用">
      			<input type="radio" id="useable" name="useable" value="N" title="禁用">
   		</div>
  </div>
		
		<div class="layui-input-block" style="text-align: right;">
			<button type="submit" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="updatebusCircuitBtn">修改</button>
			<button type="button" class="layui-btn layui-btn-primary  modalClose">关闭</button>
			
		</div>
		</form>
	</div>
	<!-- 修改模态框 End -->
	
	<script src="static/js/route/foundation/map.js"></script>
	<script src="static/js/route/foundation/busCircuit.js"></script>
</body>
<script type="text/html" id="checkboxTpl">
			<span {{d.useable=='Y'? 'class="useable font-color font-size my-bg-green"': 'class="useable font-color font-size my-bg-red"'}}>{{d.useable=='Y'?'可用':'禁用'}}</span>
	</script>
	<script type="text/html" id="busLineNameTpl">
	<span class="layui-badge-dot layui-bg-green"></span>{{d.busLineName.replace("--"," <span style='margin-top: 15px; width:50px;display: inline-block;'><div class='layui-progress'></div></span> <span class='layui-badge-dot'></span>")}}
	 
	</script>
<!-- 头部工具栏 -->
<script type="text/html" id="busCircuitToolbar">
  		<div class="layui-btn-group">
 			<button lay-event="addbusStation" class=" layui-btn layui-btn-primary layui-btn-sm" title="添加" style="margin-right:15px;"><i class="layui-icon">&#xe654;</i>添加</button>
			<button lay-event="updatebusStation" class=" layui-btn layui-btn-primary layui-btn-sm" title="修改"><i class="layui-icon">&#xe642</i>修改 </button>
			<button lay-event="frozenRecord" class=" layui-btn layui-btn-primary layui-btn-sm" title="禁用"><i class="layui-icon">&#xe702;</i>禁用 </button>
			<button lay-event="restoreRecord" class=" layui-btn layui-btn-primary layui-btn-sm" title="恢复"><i class="layui-icon">&#xe666;</i>恢复 </button>
  		</div>
	</script>
<!-- 数据表格的自定义按钮 -->
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit" >查看</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>


</html>